package com.share.device.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.share.device.domain.CabinetSlot;
import com.share.device.mapper.CabinetSlotMapper;
import com.share.device.service.ICabinetSlotService;
import org.springframework.stereotype.Service;

/**
 * 柜机插槽Service业务层处理
 *
 * @author YC
 */
@Service
public class CabinetSlotServiceImpl extends ServiceImpl<CabinetSlotMapper, CabinetSlot> implements ICabinetSlotService {

    @Override
    public CabinetSlot getBtSlotNo(Long cabinetId, String slotNo) {
        return baseMapper.selectOne(
                new LambdaQueryWrapper<CabinetSlot>()
                        .eq(CabinetSlot::getCabinetId, cabinetId)
                        .eq(CabinetSlot::getSlotNo, slotNo)
        );
    }
}
